﻿using RuoVea.ExEnum;
using RuoVea.ExSugar.Entity;
using SqlSugar;

namespace BookMarks.Server.Models;
/// <summary>
/// 浏览器书签
/// </summary>
[SugarTable(nameof(BorBookmark), "浏览器书签")]
public class BorBookmark : EntityBase 
{
    /// <summary>
    /// 
    /// </summary>
    [SugarColumn(ColumnDescription = "类别", IsNullable = true)]
    public long CategoryId { get; set; }

    /// <summary>
    /// 标题
    /// </summary>
    [SugarColumn(ColumnDescription = "标题", IsNullable = true)]
    public string Title { get; set; }

    /// <summary>
    /// 地址
    /// </summary>
    [SugarColumn(ColumnDescription = "地址", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string Url { get; set; }

    /// <summary>
    /// 图标
    /// </summary>
    [SugarColumn(ColumnDescription = "图标", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string Icon { get; set; }

    /// <summary>
    /// 排序
    /// </summary>
    [SugarColumn(ColumnDescription = "排序", IsNullable = true, DefaultValue = "10")]
    public int Sort { get; set; }

    /// <summary>
    /// 状态-正常_0、停用_1 
    /// </summary>
    [SugarColumn(ColumnDescription = "是否禁用", IsNullable = true)]
    public YesOrNot? IsDisable { get; set; }
    /// <summary>
    /// 备注
    /// </summary>
    [SugarColumn(ColumnDescription = "备注", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)]
    public string Remark { get; set; }


    #region 导航项类
    /// <summary>
    /// 组件名称
    /// </summary>
    [SugarColumn(ColumnDescription = "组件名称", IsNullable = true)]
    public string Component { get; set; }
    /// <summary>
    /// 配置信息
    /// </summary>
    [SugarColumn(ColumnDescription = "配置信息", IsNullable = true,IsJson =true)]
    public Dictionary<string, object> Config { get; set; }
    /// <summary>
    /// 导航项ID
    /// </summary>
    [SugarColumn(ColumnDescription = "导航项ID", IsNullable = true)]
    public string NavId { get; set; }
    /// <summary>
    /// 导航项大小
    /// </summary>
    [SugarColumn(ColumnDescription = "导航项大小", IsNullable = true)]
    public string Size { get; set; }
    /// <summary>
    /// 导航项类型
    /// </summary>
    [SugarColumn(ColumnDescription = "导航项类型", IsNullable = true)]
    public string Type { get; set; }
    /// <summary>
    /// 导航项视图
    /// </summary>
    [SugarColumn(ColumnDescription = "导航项视图", IsNullable = true)]
    public int? View { get; set; }
    /// <summary>
    /// 背景颜色
    /// </summary>
    [SugarColumn(ColumnDescription = "背景颜色", IsNullable = true)]
    public string BackgroundColor { get; set; }
    /// <summary>
    /// 图标文本
    /// </summary>
    [SugarColumn(ColumnDescription = "图标文本", IsNullable = true)]
    public string IconText { get; set; }
    /// <summary>
    /// 嵌套类型
    /// </summary>
    [SugarColumn(ColumnDescription = "嵌套类型", IsNullable = true)]
    public string InsetType { get; set; }
    #endregion
}
 